--hdel操作
local mapKey = KEYS[1];
local checkInfoKey = KEYS[2];
local checkCountKey = KEYS[3];
local interval = tonumber(ARGV[2]);
local checkFlag = ARGV[1];
local count = tonumber(redis.call('GET',checkCountKey))
if 1 >= count and 1 == redis.call('HEXISTS', mapKey,checkInfoKey)
then
    redis.call('HSET', mapKey, checkInfoKey,ARGV[1])
    redis.call('DECR',checkCountKey)
else
    redis.call('HSET', mapKey, checkInfoKey,ARGV[1])
    redis.call("expire", mapKey, interval)
end
return redis.call('GET',checkCountKey)
